home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-13 | 5.4 KB | 249 lines | [TEXT/MPS ] |
- //# Copyright: © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
-
- //# Primitive and Platform-Independent Types
-
- #ifndef _ODTYPESB_
- #define _ODTYPESB_
-
- #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPESB)
- #pragma somemittypes on
- #endif
-
- //==============================================================================
- // Constants
- //==============================================================================
-
- // for Undo protocol
- enum ODDoneState
- {
- kODDone,
- kODUndone,
- kODRedone
- };
-
- //==============================================================================
- // Scalar Types
- //==============================================================================
-
- // Common OD Types
-
- typedef boolean ODBoolean; // boolean value. Do not count on its size.
- typedef octet ODUByte; // unsigned >= 8-bit value
- typedef char ODSByte; // signed >= 8-bit value
- typedef unsigned short ODUShort; // unsigned >= 16-bit value
- typedef short ODSShort; // signed >= 16-bit value
- typedef unsigned long ODULong; // unsigned >= 32-bit value
- typedef long ODSLong; // signed >= 32-bit value
- typedef float ODFloat; // floating-point value
-
- typedef void* ODPtr; // OD pointer
-
- typedef string ODISOStr; // 7 bit ascii. No embedded NULLs. NULL
- // terminated.
-
- typedef ODISOStr ODType; // Used for storage types, focus types,
- // data types, etc.
-
- typedef ODULong ODTypeToken; // Tokenized form of ODType
-
- typedef ODULong ODID; // Storage Unit IDs
-
- typedef ODULong ODPersistentObjectID; // Persistent Object ID used for scripting
-
- typedef ODType ODValueType; // Used to identify the type of the value, e.g., TEXT, PICT and so
- // on. Obviously, the type doesn't need to be an OSType.
-
- typedef ODSLong ODError; // >= 32-bit exception code
-
- typedef ODULong ODToken; // >= 32-bit unsigned value for tokens
-
- typedef ODULong ODSize; // >= 32-bit unsigned value for size
-
- typedef ODULong ODInfoType; // The type for the part info stored in a frame
-
- typedef ODULong ODFlags; // >= 32-bit unsigned value for flags
-
- typedef sequence<octet> ODByteArray; // ODByteArray should be used for foreign types larger than 4 bytes
- // and for variable length data in general
-
-
- typedef ODByteArray ODContainerID;
- typedef ODISOStr ODContainerType;
-
- typedef ODType ODObjectType;
-
- typedef ODType ODFocusType; // This is a string, which can be tokenized
-
- typedef ODByteArray ODActionData; // Action data for undo/redo
-
-
- enum ODFramePosition
- {
- kODFrameBehind,
- kODFrameInFront
- };
-
- enum ODTraversalType
- {
- kODTopDown,
- kODBottomUp,
- kODChildrenOnly
- };
-
- enum ODSiblingOrder
- {
- kODFrontToBack,
- kODBackToFront
- };
-
- enum ODNSTypeSpec
- {
- kODNSDataTypeODObject,
- kODNSDataTypeODValue
- };
-
- enum ODRespectMarksChoices
- {
- kODDontRespectMarks,
- kODRespectMarks
- };
-
- enum ODActionType
- {
- kODSingleAction,
- kODBeginAction,
- kODEndAction
- };
-
-
-
- //==============================================================================
- // Imaging Types
- //==============================================================================
-
- typedef ODSLong ODFixed; // 16.16 fixed-point value
- typedef ODSLong ODFract; // 2.30 fixed-point value
-
- struct ODMatrix // Transform matrix for translation, scaling,
- { // skewing, rotation or any combination.
- ODFixed m[3][3]; // Same as "mapping" in QuickDraw GX.
- };
-
- typedef ODSShort ODGraphicsSystem; // Type of graphics system
-
- typedef ODSShort ODTransformType;
-
-
-
- enum ODGeometryMode {
- kODLoseGeometry, // Toss out geometric info to save time or space.
- kODPreserveGeometry, // Preserve geometric info as long as possible
- kODNeedsGeometry // Must keep geometric info.
- };
-
- enum ODLinkStatus
- {
- kODInLinkDestination,
- kODInLinkSource,
- kODNotInLink
- };
-
- enum ODHighlight{
- kODNoHighlight,
- kODFullHighlight,
- kODDimHighlight
- };
-
- //# For ODDragAndDrop
- enum ODDropResult
- {
- kODDropFail,
- kODDropCopy,
- kODDropMove,
- kODDropUnfinished // Used only when DragAndDrop::StartDrag returns immediately.
- };
-
-
- //# For ODLink
-
- typedef ODULong ODLinkKey;
-
-
- //# For ODTranslation
-
- enum ODTranslateResult {
- kODCannotTranslate,
- kODCanTranslate
- };
-
- typedef ODULong ODPlatformTypeSpace;
-
- //# For ODStorageUnit
-
-
-
- typedef void* ODValue;
- typedef ODID ODValueIndex;
- typedef ODID ODStorageUnitID;
-
- const ODULong kODStorageUnitRefSize = 4;
- typedef ODUByte ODStorageUnitRef[kODStorageUnitRefSize];
-
- typedef ODULong ODStorageUnitKey;
-
- typedef ODISOStr ODPropertyName;
- typedef ODISOStr ODStorageUnitName;
- typedef ODULong ODPositionCode;
-
- //# For ODDocument
-
- typedef ODID ODDocumentID;
-
- //# For ODDraft
-
- enum ODPurgePriority {
- kODInvisibleBlocks,
- kODAllBlocks,
- kODVisibleBlocks
- };
-
- enum ODCloneKind {
- kODCloneCopy,
- kODCloneCut,
- kODClonePaste,
- kODCloneDropCopy,
- kODCloneDropMove,
- kODCloneToLink,
- kODCloneFromLink
- };
-
- enum ODDraftPermissions {
- kODDPNone,
- kODDPTransient,
- kODDPReadOnly,
- kODDPSharedWrite,
- kODDPExclusiveWrite
- };
-
- typedef ODID ODDraftID;
- typedef ODISOStr ODDraftName;
-
-
- //# moved from ErrorDef.idl (NO TYPES/STRUCTS/CLASSES SHOULD BE IN .DEF FILES)
-
- exception ODException {
- ODError error;
- char message[256];
- };
-
- #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
- #pragma somemittypes off
- #endif
-
- module OpenDoc_Global_TypesB
- {
- const string OpenDoc_Types_Version = "1.0.";
- };
-
- #endif //# _ODTYPESB_
-